/*
 * @ : Copyright (c) 2020 Phytium Information Technology, Inc. 
 *  
 * SPDX-License-Identifier: Apache-2.0.
 * 
 * @Date: 2021-06-29 18:29:20
 * @LastEditTime: 2021-09-03 23:55:54
 * @Description:  This files is for 
 * 
 * @Modify History: 
 *  Ver   Who        Date         Changes
 * ----- ------     --------    --------------------------------------
 */
#include "psci.h"
#include "arm-smccc.h"
#include "ft_types.h"
#include "_cpu.h"

void PsciCpuOn(s32 cpu_id_mask, uintptr entry)
{
    u64 cluster = 0;
    struct arm_smccc_res res;
    cluster = GetCpuCluster(cpu_id_mask);
    arm_smccc_smc(0xc4000003, cluster, (u64)entry, 0, 0, 0, 0, 0, 0);
}
void PsciCpuReset(void)
{
    struct arm_smccc_res res;
    arm_smccc_smc(0x84000009, 0, 0, 0, 0, 0, 0, 0, &res);
}